Component({
  properties: {
    title: {
      type: String,
      value: '',
    },
    Ilength: {
      type: Number,
      value:10,
    },
    Ivalue: {
      type: String,
      value: '',
    }, 
    inputTitle: {
      type: String,
      value: ''
    },
    type: {
      type: String,
      value: ''
    },
    show: {
      type: Boolean,
      value: false  // 默认不显示
    },
  },

  data: {
    value: '',  // 输入框的值
  },

  methods: {
    // 确定选择
    affirm() {
      const value = this.data.value;
      this.triggerEvent('affirm', { param: value });
      this.cancle(); // 关闭组件
    },
    // 输入框内容变化时触发
    getMsg(e) {
      this.setData({ value: e.detail.value });
    },
    // 取消输入
    cancle() {
      this.setData({ show: false });
    },
  }
});
